Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): add code coverage reporting #400

Merged
merged 26 commits into from
Oct 28, 2024
Merged

feat(tests): add code coverage reporting #400

merged 26 commits into from
Oct 28, 2024

Conversation

guidojw
Copy link
Member

@guidojw guidojw commented Oct 13, 2023

Summary

Adds code coverage reporting with Codecov.
Since coverage was already very high, I modified and added some tests to get it to 100%.

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (staging@3e13408). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             staging     #400   +/-   ##
==========================================
  Coverage           ?   99.92%           
==========================================
  Files              ?      203           
  Lines              ?     2707           
  Branches           ?        0           
==========================================
  Hits               ?     2705           
  Misses             ?        2           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -79,9 +77,11 @@ def current_user
context.fetch(:user)
end

# :nocov:
def current_application
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method seems unused

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an endpoint, right? I suspect that's why it isn't covered by tests (or do we test endpoints too?) Did you check whether amber-ui depends on it?

@guidojw guidojw disabled auto-merge October 14, 2023 13:38
@guidojw guidojw requested a review from wilco375 October 14, 2023 14:56
@guidojw guidojw marked this pull request as draft October 14, 2023 15:12
@guidojw
Copy link
Member Author

guidojw commented Oct 14, 2023

Converted to draft until bol.com API token problem is resolved.

Edit: #402

@guidojw guidojw marked this pull request as ready for review November 5, 2023 00:53
Copy link
Contributor

@DrumsnChocolate DrumsnChocolate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to refresh the action hashes in the workflow?

@@ -79,9 +77,11 @@ def current_user
context.fetch(:user)
end

# :nocov:
def current_application
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an endpoint, right? I suspect that's why it isn't covered by tests (or do we test endpoints too?) Did you check whether amber-ui depends on it?

README.md Outdated Show resolved Hide resolved
Comment on lines +128 to +141
- name: Upload coverage report to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage report artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: coverage
path: coverage/
if-no-files-found: error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these result in some kind of comment on PRs, too?

lodewiges and others added 3 commits October 28, 2024 21:16
Co-authored-by: Matteo Bronkhorst <32799956+DrumsnChocolate@users.noreply.github.com>
@lodewiges lodewiges added this pull request to the merge queue Oct 28, 2024
Merged via the queue into staging with commit 153319a Oct 28, 2024
5 checks passed
@lodewiges lodewiges deleted the feat/codecov branch October 28, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants